Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |try_from_number_f64

json/value::|try_from_number_f64


Usage

|try_from_number_f64<F>(value)

Generics

◻ F: ToF64

Parameters

↳ value: F

Return

Option<Json>


Convert an f64-convertible value into a JSON number, returning none if the value is infinite or NaN.

⚠️ Infinite and NaN values are not valid JSON; use from_number_f64 if you need a fallback instead of none.